package cn.kgc.service;

import cn.kgc.mapper.UserMapper;
import cn.kgc.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @ClassName UserServiceImpl
 * @Description TODO
 * @Author yaozhaobao
 * @Date 2020/11/13 17:27
 * @Version 1.0
 **/
@Service
@Transactional
public class UserServiceImpl implements UserService{

    @Resource
    UserMapper userMapper;


    @Override
    public String getUserName(int id) {
        return userMapper.getUserName(id);
    }


    @Override
    public Integer addUser(User user) {
       int count = userMapper.insertUser(user);
       int i=0;
       i=9/i;
        return count;
    }

    public void delteteUser(int id) {

    }

}
